package com.hgyc.mom.base.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 物料类型信息
 * </p>
 *
 * @author fwj
 * @since 2025-03-24
 */
@Getter
@Setter
@TableName("base_material_type")
@Schema(name = "MaterialType", description = "物料类型信息")
public class MaterialType implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "类型编码")
    private String typeCode;

    @Schema(description = "类型名称")
    private String typeName;

    @Schema(description = "父类型ID")
    private Long parentId;

    @Schema(description = "层级路径")
    private String path;

    @Schema(description = "排列顺序")
    private Integer orderNum;

    @Schema(description = "状态，是否有效")
    private String status;

    @Schema(description = "描述")
    private String description;

    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    private Long updateBy;

    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private List<MaterialType> children;
 }
